﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Lamex.Library;
using Lamex.Interface;
using Lamex.Library.CommonClass;
//using Lamex.SPANELManager.UI;

namespace Lamex.mDashboard.UI
{
    public partial class frmDB_Main : frmModuleBase
    {
        public frmDB_Main()
        {
            InitializeComponent();
            menuStrip1.Text = ModuleNames.mDashboard; //与AssemblyModuleEntry.ModuleName定义相同
        }
        public override MenuStrip GetModuleMenu()
        {
            return this.menuStrip1;
        }
        //板材用量
        private void menuDB_PPC_BoardUsage_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmPPC_BoardUsage), sender as ToolStripMenuItem);
        }
        //利用率
        private void menuDB_PPC_Utilization_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmPPC_Utilization), sender as ToolStripMenuItem);
        }
        //HPO数据查询
        private void menuDB_PPC_HpoDataRequry_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmPPC_HpoDataRequry), sender as ToolStripMenuItem);
        }

        private void menuDB_Board_StockDetail_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmTableBoardOutInStock), sender as ToolStripMenuItem);
        }

        private void menuDB_Board_DullDetail_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmTableBoardDull), sender as ToolStripMenuItem);
        }

        private void menuDB_Board_BarCodeTime_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmTableBarcodeTime), sender as ToolStripMenuItem);
        }

        private void menuDB_LMT_GetCutSize_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmTableOpeningSize), sender as ToolStripMenuItem);
        }

        private void menuDB_PanelAss_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmPANELAssemblyQuery), sender as ToolStripMenuItem);
        }

        private void menuDB_SeatingCell_Click(object sender, EventArgs e)
        {
            //旧版，已弃用
            //MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmIE_Seat_ProcessAboard), sender as ToolStripMenuItem);
        }

        private void menuDB_ProcessScanRecord_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildWebBrowse(this.MdiParent as IMdiForm, new frmBaseChildWinForm("VIEW_BARCODE_SCANNERINFO", 0, false, false), sender as ToolStripMenuItem);
        }

        private void menuDB_PPC_ReMainderMat_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(FrmPPC_ReMainderMat), sender as ToolStripMenuItem);
        }

        private void menuDB_Desk_Defect_Report_Click(object sender, EventArgs e)
        {
            MdiTools.OpenChildForm(this.MdiParent as IMdiForm, typeof(frmDB_Desk_Defect_Report), sender as ToolStripMenuItem);
        }
    }
}